class Plus_Props
  attr_accessor   :list
  MAXHP = 1
  ATK = 2
  STR = 3
  def initialize
    @list = []
  end
  def add_plus(key, value)
    @list.push(Plus_Props_Bit.new(key, value))
  end
  def remove_plus(key, value)
    for i in 0..@list.size
      item = @list[i]
      if item != nil && item.key == key && item.value == value
        @list.delete_at(i)
        break
      end
    end
  end
  def total_value(key)
    res = 0
    for item in @list
      res += item.value
    end
    return res
  end
end
